﻿

//菜单栏功能
const QNavMenu = {};

QNavMenu.InitMenuTree = function () {
    $('#main_menu').tree({
        url: '/SystemManager/SystemMenu/GetSystemMenuTree',
        method: 'get',
        onClick: function (node) {
            if (!node.ActionName && !node.url) return;
            let url = "";
            if (node.ActionName) {
                if (node.Area) url = "/" + node.Area;
                if (node.Controller) url = url + "/" + node.Controller;
                if (node.ActionName) url = url + "/" + node.ActionName;
            }
            let title = node.text;
            QFunc.addTab(title, url);
        }
    });
}



window.QNavMenu = QNavMenu;